The above move is superflous so don't do it. Simply hide and show without repositioning the window. window managers and decoractions make the kind of move you are trying ambiguous.
If you must explicitly position the window then do move() before the initial show and always use that location, understanding that it won't be accurate (because the window manager decorations are not part of the wiget's geometry.
This is the price you pay for a plethora of plug-in widow managers with different capabilities and styles.